<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="/jQuery_class_stu/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("#getBtn").on("click", function(){
		//$.get("url", "요청파라미터(js객체 || queryString)", callback함수)
		$.get("/jQuery_class_stu/jQueryServlet", {cmd:"getData", param:"request param"}, callback);
	});
	
	$("#postBtn").on("click", function(){
		$.post("/jQuery_class_stu/jQueryServlet", {cmd:"getData", param:"요청파라미터입니다."}, callback);
	});
});
//callback : 1.응답 데이터(문자열) 2.응답 메세지(success) 3.XHR(jQuery용)
function callback(resData){
	$("#showLayer").html(resData);
}
</script>
</head>
<body>
<input type="button" value="Get요청" id="getBtn">
<input type="button" value="Post요청" id="postBtn">
<div id="showLayer"></div>
</body>
</html>
